package util;



public class Attribute {
	private Type type = null;
	private String name = null;
	
	public Type getType() {
		return type;
	}
	
	public String getName() {
		return name;
	}

	public String getTypename(){
		return type.toString();
	}

	public Attribute(String name, Type type) {
		this.name = name;
		this.type = type;
	}

	public boolean isArray() {
		return type.isArray();
	}

	public int getArraySize() {
		return type.getArraySize();
	}
	
	public Reference newReference(String name){
		return new Reference(name, type);
	}
	
	public String toString(){
		return this.type+" "+this.name;
	}
}
